1. Field of Disclosure
This disclosure relates generally to parsing webpage content and more particularly to extracting recipe text from a webpage, as well as selecting a representative image of a recipe from images in a webpage containing a recipe.
2. Description of the Related Art
Computational parsers analyze strings of data to identify distinct tokens (e.g., words, numbers, images) in the text and to organize the identified tokens into a meaningful structure (e.g., sentences, paragraphs, lists). When combined with natural language processing techniques, parsing may be used to determine significance of tokens or relationships between tokens. Although these techniques have been applied to grammatical analysis of sentences, they are generally ill-suited to recognizing recipes in structured documents (e.g., webpages) and organizing them for further analysis or uniform presentation. For example, recipes in webpages may be difficult to analyze because various webpages organize recipes differently. Some webpages contain recipe formatting metadata that labels different components of recipes (e.g., title, ingredients, preparation steps). However, few recipes available online implement this recipe-specific formatting, so recipe formatting metadata is not useful for extracting recipes from most webpages.
Pattern recognition and computer vision focus on recognizing patterns in images. For example, facial recognition seeks to recognize an image subject's face across various images of the image subject. To recognize a face in an image, the image may be analyzed to detect facial structure or other characteristics (e.g., color). Unlike faces, food has no uniform structure or colors. Thus, conventional image processing techniques are ill-suited for distinguishing images of prepared food from images of ingredients or images unrelated to food.